// Copyright © 2014 Swiss IT Bridge
// Author: Nguyen Trung Loi (loi.nguyen)
// Maintain by loi.nguyen and ha.tran

// CONFIG TEST
config.project = 'APP'
config.test = 'Register'
config.url = 'http://127.0.0.1:1234/public'
config.timeout = 99999999
config.browser = 'chrome'
config.step = ['expect','click','set','key']

// LOGIN TEST
test.$1 = function() {
    title('Peslook')
    set({
        '#app_login_username':'nam@gmail.com',
        '#app_login_password':'123'
    })
    click(['#app_login_remember','#app_login_button button'])
    wait(5)
}

// CHANGE AVATAR
test.$2 = function() {
    title('Peslook');

    click(['.index_option','#app_login_button button'])
}

// REGISTER TEST
test.$_1 = function() {
    title('Peslook')
    set({
        '#app_register_fullname input':'Nguyen Truong Trung Tin',
        '#app_register_email input':'sampffleuser123@live.com',
        '#app_register_password input':'12345678',
        '#app_register_confirm_password input':'12345678'
    })
    wait(2)
    click('#app_register_button button')
    wait(5)
    click('#app_register_list_question')
    wait(5)
    click(['.app_register_question_suggest li:nth-child(2)'])
    wait(10)
    set({
        '#app_register_anwser_private': 'Sample question',
        '.app_register_confirm_capcha' : '12345'
    });
    click(['#app_register_button_continue']);
}